/*
 *  comp.c (part of p8.c)
 *  
 *
 *  Created by Shang-Ju Chen on 3/5/11.
 *  
 *
 */

int
comp( int s,int *p )
{
	for( modes = (int)mode[s]; *p && s; p++ )
	{
		if (symbol[--s] != *p)
		{
			return(2);
		}
		
		if(2 < (modes |= (int)mode[s]))
		{
			return(1);
		}
	}
	
	return(0);
}

